package com.think.admin.web.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.think.admin.model.dto.user.SysUserDTO;
import com.think.admin.model.query.SysUserQuery;
import com.think.common.enums.IsDeleteEnum;
import com.think.common.enums.StateEnum;
import com.think.common.web.mapper.SuperMapper;
import com.think.dao.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 管理员用户表 Mapper 接口
 * </p>
 *
 * @author xwj
 * @since 2019-04-08
 */
public interface SysUserMapper extends SuperMapper<SysUser> {

    /**
     * 分页查询管理员信息
     *
     * @param page
     * @param ruleOutIdList
     * @param sysUserQuery
     * @param enableValue
     * @param isDeleteEnum
     * @return java.util.List<com.think.admin.model.dto.user.SysUserDTO>
     * @author xwj
     * @data 2019/5/22
     */
    List<SysUserDTO> selectPageSysUser(Page<SysUserDTO> page,
                                       @Param("ruleOutIdList") List<String> ruleOutIdList,
                                       @Param("sysUserQuery") SysUserQuery sysUserQuery,
                                       @Param("enableValue") StateEnum enableValue,
                                       @Param("normalValue") IsDeleteEnum isDeleteEnum);

    /**
     * <p>
     * 销售人员查看
     * </p>
     * @author CaiWenYi
     * @Date: 2019/7/14 12:10
    */
    List<SysUserDTO> selectPageSysUserSelectList(Page<SysUserDTO> page,  @Param("sysUserQuery")SysUserQuery sysUserQuery);

    /**
     * 根据id查询自己创建的账号ID
     * @param id
     * @return
     */
    List<String> selectSalesIds(@Param("id") String id);
}
